abstract class Shape {
    public abstract double calculateArea();
}

class Circle extends Shape {
    private double radius;

    public Circle(double r) {
        radius = r;
    }

    @Override
    public double calculateArea() {
        return Math.PI * radius * radius;
    }
}

class Rectangle extends Shape {
    private double length;
    private double width;

    public Rectangle(double l, double w) {
        length = l;
        width = w;
    }

    @Override
    public double calculateArea() {
        return length * width;
    }
}

public class Main {
    public static void main(String[] args) {
        Shape[] shapes = new Shape[10];  // 假设创建10个形状对象示例

        for (int i = 0; i < shapes.length; i++) {
            int randomChoice = (int) (Math.random() * 2);
            if (randomChoice == 0) {
                double radius = Math.random() * 10 + 1;  // 半径范围1到10
                shapes[i] = new Circle(radius);
            } else {
                double length = Math.random() * 10 + 1;  // 长范围1到10
                double width = Math.random() * 10 + 1;  // 宽范围1到10
                shapes[i] = new Rectangle(length, width);
            }
        }

        for (Shape shape : shapes) {
            System.out.println("Shape area: " + shape.calculateArea());
        }
    }
}